<!DOCTYPE html>
<html>
    <head>
        <meta name="layout" content="main2" />
        <g:set var="entityName" value="${message(code: 'loginHistory.label', default: 'LoginHistory')}" />
        <title><g:message code="default.list.label" args="[entityName]" /></title>
    </head>
<body>
<div class="main-body">
    <div class="page-wrapper">
        <!-- Page-header start -->
        <div class="page-header">
            <div class="page-header-title">
                <h4>登录明细</h4>
            </div>

            <div class="page-header-breadcrumb">
                <ul class="breadcrumb-title">
                    <li class="breadcrumb-item">
                        <a href="/salesDashboard/index">
                            <i class="icofont icofont-home"></i>
                        </a>
                    </li>
                    <li class="breadcrumb-item"><a href="#!">登录明细</a>
                    </li>
                </ul>
            </div>
        </div>
        <!-- Page-header end -->
        <!-- Page-body start -->
        <div class="page-body">
            <!-- Hover table card start -->
            <div class="card">
                <div class="card-header">
                    <h5>登录明细</h5>

                    <div class="card-header-right">
                        <i class="icofont icofont-rounded-down"></i>
                    </div>
                </div>

                <div class="card-block dt-responsive">

                    <div class="table-responsive">
                        <div id="dom-jqry_wrapper" class="dataTables_wrapper dt-bootstrap4">
                          <table class="table table-striped  table-bordered table-hover">
                              <thead>
                              <tr>
                                  <g:sortableColumn property="userName" title="${message(code: 'loginHistory.userName.label', default: '登录名')}"/>
                                  <g:sortableColumn property="ip" title="${message(code: 'loginHistory.ip.label', default: 'IP')}"/>
                                  <g:sortableColumn property="status" title="${message(code: 'loginHistory.status.label', default: '状态')}"/>
                                  <g:sortableColumn property="createdDate" title="${message(code: 'loginHistory.createdDate.label', default: '登录时间')}"/>

                              </tr>
                              </thead>
                              <tbody>
                              <g:each in="${loginHistoryList}">
                                  <tr>
                                  <td>${it?.userName}</td>
                                  <td>${it?.ip}</td>
                                  <td>${it?.status}</td>
                                  <td><g:formatDate format="yyyy-MM-dd HH:mm:ss" date="${it?.createdDate}"/></td>
                                  </tr>
                              </g:each>
                              </tbody>
                          </table>

                          <div class="dataTables_paginate">
                              <div class="pagination">
                                  <g:paginate total="${loginHistoryCount ?: 0}" params="${params}"/>
                              </div>
                          </div>
                      </div>

                    </div>

                </div>
            </div>
            <!-- Hover table card end -->
        </div>
        <!-- Page-body end -->
    </div>
</div>
</body>
</html>
